package String;

/**
 * char charAt(int index)
 * 获取当前字符串指定位置处的字符
 */
public class CharAtDemo {
    public static void main(String[] args){
        //             0123456789012345
        String line = "thinking in java";

        char c = line.charAt(9);
        System.out.println(c);

        //检索回文
        //
        String str = "上海自来水来自海上";
        for(int i = 0; i<str.length()/2;i++){
            char c1 = str.charAt(i);
        }
    }
}
